<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
	<script src="../public/js/jquery-1.10.2.min.js"></script>
  <title>testinsert</title>
</head>
<body>
  <input type="text" placeholder="time"id='time'>
  <input type="text" placeholder="emid" id='emid'>
  <input type="button" value="插入10000条数据" id='go'>
  <input type="button" value="导出数据" id='out'></br>
  <input type="text" placeholder="日期" id='date'><span id='datetime'></span></br>
  <input type="button" value='转' id='fuck1'>
  <input type="button" value='反转' id='fuck2'>
  <script type="text/javascript">
    $('#fuck1').click(function(){
      $('#datetime').text(Date.parse(new Date($('#date').val()))/1000);
    });
    $('#fuck2').click(function(){
      var date = new Date();
      date.setTime($('#date').val()*1000);
      $('#datetime').text(date.toJSON());
    });
    $('#go').click(function(event) {
      console.log('正在插入1000条数据');
      $.ajax({
        url:'/login/insertgo',
        type:'GET',
        data:{
          time:$('#time').val(),
          emid:$('#emid').val()
        },
        success:function(msg){
          console.log('插入成功');
        },
        error:function(msg){
          console.log('服务器链接超时');
        }
      },'text');
    });
    $('#out').click(function(event) {
      console.log('查询中');
      window.location.href="/login/outsummarygo";
      // $.get('/login/outsummarygo', function(data) {
      //   console.log(data);
      //   console.log('查询完毕');
      // });
    });
  </script>
</body>
</html>
